import request from '@/utils/request'

// 查询orderItem列表
export function listOrderItem(query) {
  return request({
    url: '/orderItem/list',
    method: 'get',
    params: query
  })
}

// 分页查询orderItem列表
export function listOrderItemByPage(query) {
  return request({
    url: '/orderItem/page',
    method: 'get',
    params: query
  })
}

// 查询orderItem
export function getOrderItem(id) {
  return request({
    url: '/orderItem/' + id,
    method: 'get'
  })
}

// 新增orderItem
export function addOrderItem(data) {
  return request({
    url: '/orderItem',
    method: 'post',
    data: data
  })
}

// 修改orderItem
export function updateOrderItem(data) {
  return request({
    url: '/orderItem',
    method: 'put',
    data: data
  })
}

// 删除orderItem
export function deleteOrderItem(id) {
  return request({
    url: '/orderItem/' + id,
    method: 'delete'
  })
}
